#include <stack>
#include <vector>
struct Node {
  int val;
  Node *left;
  Node *right;
  Node() : val(0), left(nullptr), right(nullptr) {}
};

int main(int argc, char *argv[]) { return 0; }

void pre(Node *Head, std::vector<int> &res) {
  if (Head == nullptr) {
    return;
  }
  res.push_back(Head->val);
  pre(Head->left, res);
  pre(Head->right, res);
}

void pre2(Node *Head, std::vector<int> &res) {
  if (Head == nullptr)
    return;
  std::stack<Node *> tempstack;
}
